package pl.edu.agh.neuraleconomy.core.ta.indicator;

public class SROCCalculator extends ROCCalculator{
	private int emaPeriod = 13;
	private ICalculator emaCalc = new EMACalculator(emaPeriod);
	
	
	@Override
	public double[] calculate(double[] data) {
		data = emaCalc.calculate(data);
		return super.calculate(data);
	}

	@Override
	protected int getHeadValue() {
		return super.getHeadValue() + emaPeriod;
	}

	public SROCCalculator(int period) {
		super(period);
	}

}
